import React from 'react';
import ProForm, {ProFormRadio, ProFormText} from "@ant-design/pro-form";
import {Image, message, Modal} from "antd";

const MyComponent = (props) => {
  const {isedit,issetEdit} = props
  return (
    <Modal<{
      name: string;
      company: string;
    }>
      visible={isedit}
      modalProps={ {
        onCancel:() => {issetEdit(false)}
      } }
      onFinish={async (values) => {
        console.log(values.name);
        message.success('提交成功');
        return issetEdit(false);
      }}
    >
      <ProForm>
            <div>
              <ProFormText
                width={750}
                name="name"
                label='提货点名称'
                tooltip="提货点名称"
                placeholder='提货点名称'
              />
            </div>
            <div>
              <ProFormText
                width={750}
                name="Pickup "
                label='提货点简介'
                tooltip="提货点简介"
                placeholder='提货点简介'
              />
            </div>
            <div>
              <ProFormText
                width={750}
                name="phone "
                label='提货点手机号'
                tooltip="提货手机号"
                placeholder='提货手机号'
              />
            </div>
            <div>
              <ProFormText
                width={750}
                name="url "
                label='详细地址'
                tooltip="详细地址"
                placeholder='详细地址'
              />
            </div>
            <div style={ {marginLeft: '0px'}}>
              <ProFormRadio.Group
                name="logo"
                label="提货点logo："
                tooltip="提货点logo："
              >
                <Image
                  width={60}
                  src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSFCLBqo0p_ZYZUBBRmPdGEZWpCxm2ZQhVDOg&usqp=CAU"
                />
              </ProFormRadio.Group>
            </div>
      </ProForm>
    </Modal>
  );
};

export default MyComponent;
